/*
 * @FilePath: Sky.js
 * @Author: 杜芬
 * @Date: 2024-05-08 16:45:47
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-05-08 16:52:52
 * Copyright: 2024 xxxTech CO.,LTD. All Rights Reserved.
 * @Descripttion: 页面
 */
// 天空背景类
import * as THREE from 'three'

export class Sky {
  constructor(scene) {
    this.scene = scene
  }
  // 创建并设置天空背景
  setBack(publicPath, pathList) {
    (new THREE.CubeTextureLoader()).setPath(publicPath).load(pathList,(texture) => {
       this.scene.background = texture
    })
  }
}